The present invention relates to circuits for use in optical rangefinders and, more particularly, to a new and improved optical rangefinder circuit adapted to compare signals from two optical sensor arrays to determine the distance to an object.
Optical rangefinders for cameras and the like have been known for a long time. Recent years have seen the advent of a purely electronic rangefinder containing no movable parts at all. Such rangefinders have attracted a great deal of attention because they are small in size, inexpensive to manufacture, and highly accurate.
The principles of conventional electronic rangefinders are shown in FIGS. 1 and 2 of the accompanying drawings. As illustrated in FIG. 1, beams of light, such as reflected sunlight emitted from an object 1 at a distance which is to be measured, follow two spatially different optical paths 4 and 5 and fall on a pair of small lenses 2 and 3 mounted in an optical instrument. The lenses are spaced by a base distance b from each other and each lens has a focal length f.
In the illustrated example, the object 1 has a luminous intensity distribution represented by two mountain shapes. Images 7 and 8 of the object, each having a corresponding luminous intensity distribution, are focused by the lenses 2 and 3 on a common focal plane 6. For the sake of brevity, the center of the object 1, represented by the center of the luminous intensity distribution 1c, is shown as being positioned on the axis of the small lens 2 so that the path 4 coincides with that axis. The image 7 formed in the focal plane 6 by the small lens 2 has a center 7c which falls at a position 70, and the central position 70 of the image 7, being on the axis of the lens 2, does not change when the distance d between the object 1 and the lens 2 changes. When the distance d to the object 1 corresponds to infinity, so that the paths 4 and 5 are essentially parallel, the center 8c of the image 8 formed by the small lens 3 is positioned at a position 80 in the focal plane 6 behind the lens 3. As the distance d is reduced, the center 8c moves to the left as shown in FIG. 1. In the illustrated positional relationship, the image center 8c is located at a position 81 which is spaced a distance x from the original position 80 in the focal plane 6.
A pair of light sensor arrays 10 and 11 is disposed in the focal plane 6 at positions corresponding to the locations of the images 7 and 8 of the object 1 which are focused by the small lenses 2 and 3, respectively. The light sensor arrays 10 and 11 are generally composed of different numbers m and n of photovoltaic elements or photosensitive resistor elements. As shown in FIGS. 2A and 2B, each sensor element of the arrays generates an electric signal corresponding to the quantity of light which that sensor receives, for example, a signal directly proportional to the integrated intensity of the light incident on the element. Assuming the deviation distance x can be measured in some way, the distance d to the object 1 can be determined by the equation: EQU d=b.multidot.f/x (1)
based on the simple principle of triangulation.
The signals produced by the sensors in the arrays 10 and 11 have analog values as represented in FIGS. 2A and 2B, and thus the distributions of the output signals along the light sensor arrays have the illustrated step-like patterns. While these analog values may be utilized in determining the deviation distance x, it is customary to quantize the analog values into digital values for simplifying the electronic circuitry and increasing the accuracy of the determination. According to the simplest quantizing means, the analog values are compared with an appropriate threshold voltage V.sub.t as shown in FIGS. 2A and 2B, and are converted into 1-bit digital values by regarding those analog values which are greater than the threshold voltage V.sub.t as having a digital value of "1", and those analog values which are less than the threshold voltage V.sub.t as having a digital value of "0", as illustrated in FIGS. 2C and 2D. The distributions of the digital values along the light sensor arrays 10 and 11 as shown in FIGS. 2C and 2D are then compared with each other by the electronic circuitry, so that the deviation distance x can be measured as represented by the number of sensors. Since the digital value distribution indicated by the dotted lines in FIG. 2D is produced when distance d to the object 1 is infinite and the deviation distance x is zero, the measurement of the distance d may be accomplished by determining the distance x on the light sensor array in FIG. 2D as expressed by the number of sensors between the detected digital value distribution and the corresponding dotted line distribution.
In the example of FIG. 1, a viewfinder for locating the object 1 to which the distance d is to be determined has an optical axis aligned with the optical axis of the small lens 2, that is, the small lens 2 faces the object 1 directly. However, the optical axis of a viewfinder is not generally in line with the optical axis of the small lens. Assuming that the viewfinder axis is positioned intermediate between the two small lenses 2 and 3, the images 7 and 8 on the light sensor arrays 10 and 11 of an object which is not at a finite distance are displaced corresponding rightward and leftward distances x.sub.1 and x.sub.2 from original positions in which the image would appear if the object 1 were at an infinite distance. In this case, the distance d to the object 1 can also be determined from the foregoing equation by employing x=x.sub.1 +x.sub.2. Accordingly, the measurement of the distance d remains equal to the determination of the deviation distance x of the images on the light sensor arrays.
A rangefinder circuit according to the prior art based on the foregoing principles is shown in FIG. 3. FIG. 3 illustrates two shift registers 12 and 13 storing digital image signals obtained by quantizing output signals as shown in FIGS. 2A and 2B from the light sensor arrays 10 and 11 of FIG. 1 with analog-to-digital converters (not shown), the digital image signals being stored in the same sequence as that in which the sensors are arrayed in the light sensor arrays. When the image signals have been stored in the shift registers 12 and 13, a shift signal is transmitted from a timing control unit 14 to the control terminals "CTR" of the shift registers 12 and 13 to cause image signal data stored in the shift registers 12 and 13 to be successively issued from output terminals "out" of the shift registers in mutual synchronism at each stage. The output signals from the shift registers 12 and 13 are fed back to the input terminals "in" thereof and reenter the shift registers 12 and 13. An exclusive-NOR gate 15 transmits a signal of a logic level "1" when the output signals from the shift registers 12 and 13 coincide with each other, and transmits a signal of a logic level "0" when the output signals from the shift registers 12 and 13 differ from each other. A counter 16 counts the "1" output signals transmitted by the exclusive-NOR gate 15 whenever successive synchronous image data from the shift registers 12 and 13 coincide with each other.
It is now assumed that the light sensor arrays 10 and 11 shown in FIG. 1 have m and n sensors, respectively, that m and n image data items are stored respectively in the shift registers 12 and 13, and that m&lt;n. When m data items have been issued from the shift registers 12 and 13 after the start of data generation, all of the data items stored in the shift register 12 and first m data items stored in the shift register 13 have been compared with each other. At this time, the counter 16 has counted the number of bits which coincide with each other as a result of comparison of the image data items which are stored in the shift registers 12 and 13 and are not shifted relatively to each other, that is, under the condition in which the number of shifted data items is zero. In this condition, the data items which are stored in the shift register 12 have been shifted through one cycle back to their initial storage positions, and the data items stored in the shift register 13 have been shifted m bits to the right. The count in the counter 16 is now stored in a maximum coincidence number storage unit 17.
In response to a command from the timing control unit 14, the data items in the shift register 13 are further shifted by (n-m+1) bits, and the counter 16 is cleared, the net result being that the data items in the shift register 13 have been shifted one bit to the right from their initial positions. A counter 18, which serves to count the number of bits the data items in the shift register 13 have been shifted to the right from the initial data position, is incremented each time data items from the shift registers 12 and 13 have been compared. A second data comparison cycle is effected while successively shifting the data items in the shift registers 12 and 13 m times to the right in the same manner as described above. After the second data comparison cycle has been completed, the count C.sub.1 in the counter 16 and a count C.sub.2 in the maximum coincidence number storage circuit 17 are compared by a comparator 19, which stores the count C.sub.1 into the maximum coincidence number storage circuit 17 whenever C.sub.1 .gtoreq.C.sub.2. At the same time, a count S1 in the shift counter 18 is stored in a shift number storage circuit 20. Thereafter, the data items in the shift register 13 are again shifted by (n-m+1) bits to the right, and the counter 16 is cleared.
The comparison of the data items stored in the shift registers 12 and 13, the comparison of counts in the counter 16 and the maximum coincidence number storage circuit 17, the resultant changing of the data in the maximum coincidence number storage circuit 17 and the shift number storage circuit 20, the shifting of the data items in the shift register 13 by (n-m+1) bits, and the clearing of the counter 16 are repeated a predetermined number of times. After the selected number of repetitive cycles has been completed, the maximum coincidence number storage circuit 17 has stored the maximum coincidence number produced as a result of successive determination of coincidence between the data items stored in the shift register 12 and a portion of the data items stored in the shift register 13, and the shift number storage circuit 20 has stored the number of relative shifts between the shift registers 12 and 13, that is, the deviation distance x as shown in FIG. 2D, which produced the maximum coincidence number stored in the maximum coincidence number storage circuit 17. At a final step of operation, the timing control unit 14 causes the data from the shift number storage circuit 20 to be registered at an output unit 21 which will transmit the registered data in the form of a distance signal to an external circuit.
With the foregoing conventional circuit for comparing image data to measure the distance to an object, it is necessary to circulate the data items through the shift registers 12 and 13 a number of times while changing the number of relative shifts of the stored data items until the maximum coincidence is reached between the two image data trains. Consequently, it takes a long period of time for the image data sets to be compared with each other. Where a rangefinder having such an image data comparison circuit is incorporated in an optical instrument such as a video camera which receives a scene while scanning its field of view, the image actually received by the camera tends to be out of focus since that image is likely to differ from the field of view that has been focused by the rangefinder because of the relatively long period of time required for the rangefinder distance measurement and resulting focus adjustment. Ordinary still cameras suffer from the same problem when an object to be photographed is moved abruptly or the camera wobbles before the shutter is closed. In order to overcome this problem the time required for distance measurement and particularly, the image data comparison time must be shortened.
It is an object of the present invention to provide an image data comparison circuit for rangefinders which overcomes the above-mentioned difficulties of the prior art by reducing the time required for distance measurement.